export default "precision highp float;\n#define GLSLIFY 1\n\nuniform float time;\nuniform float duration;\nuniform vec2 imgRatio;\nuniform sampler2D noiseTex;\n\nvarying vec2 vUv;\nvarying float vOpacity;\n\nvec3 convertHsvToRgb(vec3 c) {\n  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvoid main() {\n  vec2 updateUv = vUv * imgRatio + vec2(\n    (1.0 - imgRatio.x) * 0.5,\n    (1.0 - imgRatio.y) * 0.5\n    );\n\n  float noiseR = texture2D(noiseTex, updateUv + vec2(time * 0.1, 0.0)).r;\n  float noiseG = texture2D(noiseTex, updateUv + vec2(time * 0.2, 0.0)).g;\n\n  vec3 rgb = convertHsvToRgb(vec3(0.1, 0.5, 0.75));\n  float opacity = vOpacity * smoothstep(0.4, 0.6, noiseR);\n\n  if (opacity < 0.01) {\n    discard;\n  }\n\n  gl_FragColor = vec4(rgb, opacity);\n}\n";